package com.StarStudio.Service;

import com.ruoyi.common.core.Entity.GoodsStock;
import com.ruoyi.common.core.Entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Service
@FeignClient(value = "GoodsStock")
public interface GoodsStockService {

    @RequestMapping("/UnsoldItemIds/{id}")
    List<Long> findUnsoldItemIdsByGoodsId(@PathVariable(value = "id") long id);

    @RequestMapping("/realDelete/{id}")
    void realDelete(@PathVariable(value = "id") long id);

    @RequestMapping("/SoldItemIds/{id}")
    List<Long> findSoldItemIdsByGoodsId(@PathVariable(value = "id") long id);

    @RequestMapping("/updateDelFlag/{id}")
    void updateDelFlag(@PathVariable(value = "id") long id);

    @PostMapping("/post")
    Result addGoodsStock(@RequestBody GoodsStock goodsStock);

    @RequestMapping("/findGoodsStockIds/{goodsId}/{storeId}")
    List<Long> findGoodsStockIds(@PathVariable(value = "goodsId") long goodsId, @PathVariable(value = "storeId") long storeId);

    @RequestMapping("/UnsoldItems/{goodsId}/{flag}")
    List<GoodsStock> findUnsoldItems(@PathVariable(value = "goodsId") long goodsId,@PathVariable(value = "flag") boolean flag);

    @RequestMapping("/SoldItems/{goodsId}/{flag}")
    List<GoodsStock> findSoldItems(@PathVariable(value = "goodsId") long goodsId,@PathVariable(value = "flag") boolean flag);

    @PutMapping("/put")
    Result updateGoodsStock(@RequestBody GoodsStock goodsStock);







}
